// import axios from 'axios'
import React, { useEffect, useState } from 'react'
import './index.css'
export default function Myjf() {
    const [myjf, setmyjf] = useState([])
    useEffect(() => {
        // axios.post('http://localhost:3001/mycenter/data',{}).then((res)=>{
        //     console.log(res);
        // })
        setmyjf([
            {
                time: '2021-12-1 20:22:11',
                did: '+100',
                where: '消费赠送'
            }, {
                time: '2021-12-1 20:22:11',
                did: '+100',
                where: '消费赠送'
            }, {
                time: '2021-12-1 20:22:11',
                did: '+100',
                where: '消费赠送'
            }, {
                time: '2021-12-1 20:22:11',
                did: '+100',
                where: '消费赠送'
            }, {
                time: '2021-12-1 20:22:11',
                did: '+100',
                where: '消费赠送'
            },
        ])
    }, [])
    return (
        <div>
            <h3 className="tt">我的积分</h3>
            <ul className='myjf'>
                <li>
                    <span>积分日期</span>
                    <span>变动</span>
                    <span>来源</span>
                </li>
                {
                    myjf.map((myjf, i) => {
                        return <li key={i}>
                            <span>{myjf.time}</span>
                            <span>{myjf.did}</span>
                            <span>{myjf.where}</span>
                        </li>
                    })
                }
            </ul>
        </div>
    )
}
